package com.transaction.manage.localMapper;

import com.transaction.manage.model.dto.FundTransRate;
import com.transaction.manage.myMapper.MyMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.math.BigDecimal;
import java.util.List;

public interface FundTransRateMapper extends MyMapper<FundTransRate> {

    @Update("UPDATE fund_trans_rate SET valid_flag = '00' ,check_flag = '00' WHERE id = #{id} ")
    void deleteFundTransRate(Integer id );

    @Update("UPDATE fund_trans_rate SET check_flag = '01' WHERE id = #{id} ")
    void checkFundTransRate(Integer id );

    List<FundTransRate> selectFundTransRateList(FundTransRate fundTransRate);

    void insertFundTransRate(FundTransRate fundTransRate);

    void updateFundTransRate(FundTransRate fundTransRate);

    FundTransRate selectFundTransRate(FundTransRate fundTransRate);

    FundTransRate selectFundTransRateByBuyAmount(@Param("channelCode") String channelCode,
                                      @Param("fundCode") String fundCode,
                                      @Param("businessCode") String businessCode,
                                      @Param("indiOrInst") String indiOrInst,
                                      @Param("currencyType") String currencyType,
                                      @Param("applyAmount") BigDecimal applyAmount);
}